<?php get_header(); ?>

    <div class="main-content-inner global-width">
    	
    	<section class="contents full-width">
        
        	<?php if ( have_posts() ) : ?>

				<h1><?php printf( __( 'Search Results for: %s', 'twentyeleven' ), '<span>' . get_search_query() . '</span>' ); ?></h1>


				<ul class="search-results">
					<?php /* Start the Loop */ ?>
					<?php while ( have_posts() ) : the_post(); ?>
					                
						<li>
						<?php if(has_post_thumbnail($post->ID )) {
                              	$image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); 
								$image = $image[0];
							  }
							  else
							  	//$image =bloginfo( 'template_url' )."/images/img.gif";
								$image="http://armchairweddingguru.co.uk/wp-content/uploads/2012/03/img.gif";
						?>
                        
						<a href="<?php the_permalink(); ?>"><img src="<?php echo $image;?>" alt="Image" class="float-left" /></a>
							<p class="bold"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></p>
							<p><?php the_excerpt(); ?></p>
                            <a class="button" href="<?php the_permalink(); ?>">Detail</a>
                            <div class="clearfix"></div>
						</li>
					    
					<?php endwhile; ?>
                </ul>
                
                <?php else : ?>

				<h1><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1>

				<p><?php _e( 'Sorry, but nothing matched your search criteria. Please try again with some different keywords.', 'twentyeleven' ); ?></p>
				<article class="search one-third search-page"><?php get_search_form(); ?></article>

			<?php endif; ?>
    		
    	</section>   
    	     
    	<div class="clearfix"></div>
    </div>
        
</section>
   
    

<!-- Main Content Ends -->
</section>

<?php get_footer(); ?>
